<template>
  <div>
    <h2>流水页面</h2>
      <el-table
        :data="tableData"
        style="width: 100%">
        <el-table-column
          prop="name"
          label="姓名"
          width="120">
        </el-table-column>
        <el-table-column
          prop="number"
          label="账户号">
        </el-table-column>
        <el-table-column
          prop="balance"
          label="业务操作前余额">
        </el-table-column>
        <el-table-column
          prop="moneyEnd"
          label="业务操作后金额">
        </el-table-column>
        <el-table-column
          prop="type"
          label="业务类型">
        </el-table-column>
        <el-table-column
          prop="moneyUser"
          label="操作金额">
        </el-table-column>
        <el-table-column
          prop="nowTime"
          label="业务时间">
        </el-table-column>
        <el-table-column
          prop="nameYour"
          label="转账对方姓名">
        </el-table-column>
        <el-table-column
          prop="numberYour"
          label="转账账号">
        </el-table-column>
        <el-table-column width="120px"
                         label="操作">
        </el-table-column>
      </el-table>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page.sync="SerachWa.page"
      :page-size="SerachWa.pageSize"
      layout="total, prev, pager, next"
      :total="SerachWa.total">
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: 'StreamView',
  data () {
    return {
      tableData: [],
      SerachWa: {
        page: 1,
        pageSize: 3,
        key: '',
        total: 0,
        name: '',
        number: '',
        balance: null,
        moneyEnd: null,
        type: '',
        moneyUser: null,
        nowTime: '',
        nameYour: '',
        numberYour: null,
        acid: null
      }
    }
  },
  methods: {
    handleSizeChange (val) {
      this.SerachWa.pageSize = val
      this.list()
    },
    handleCurrentChange (val) {
      this.SerachWa.page = val
      this.list()
    },
    list () {
      this.SerachWa.acid = this.$route.query.id
      this.axios.post('/water/listWater', this.SerachWa)
        .then(res => {
          this.tableData = res.data.records
          this.SerachWa.page = res.data.current
          this.SerachWa.pageSize = res.data.size
          this.SerachWa.total = res.data.total
        })
    }
  },
  created () {
    this.list()
  }
}
</script>

<style scoped>

</style>
